<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>电影详情</title>
    <%- include common %>

    <style>
        .thumbnail>img {
            height: 240px;
            width: 200px;
        }

        .thumbnail {
            cursor: pointer;
        }
    </style>
</head>

<body>
    <%- include("head",{title:"movie",username}) %>

    <div class="container-fluid">
        <div class="row">
            <div class="col-md-6 col-sm-12">
                <h4 class="text-primary text-center">电影介绍</h4>
                <div class="thumbnail">
                    <img src="<%- result.images.large.replace(/img7/,'img3') %>" alt="">
                    <div>
                        <p class="text-primary"><%- result.title %></p>
                        <p class="text-info">年份：<%- result.year %></p>
                        <p class="text-danger">评分：<%- result.rating.average %></p>
                        <p class="text-warning">分类：<%- result.genres %></p>
                        <p class="text-primary">导演：<%- result.directors[0].name %></p>
                        <p class="text-danger">演员：
                            <%  result.casts.forEach(v=>{  %>
                            <span><%- v.name %></span>
                            <%  })  %>
                        </p>
                        <div style="width: 100%;overflow: hidden;">
                            <div style="overflow: auto;">
                                <%  result.casts.forEach(v=>{  %>
                                <img style="width: 160px; height: 200px;"
                                    src="<%- v.avatars.small.replace(/img7/,'img3') %>" />
                                <%  })  %>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="col-md-6 col-sm-12">
                <h4 class="text-warning">添加评论</h4>
                <form method="POST" action="/comment/submit?mid=<%- result.id %>" class="form-horizontal">

                    <div class="form-group" id="usernameBox">
                        <label for="title" class="col-sm-2 control-label">评论标题</label>
                        <div class="col-sm-10">
                            <input type="text" name="title" class="form-control" id="title" placeholder="请输入评论标题">
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="content" class="col-sm-2 control-label">评论内容</label>
                        <div class="col-sm-10">
                            <textarea rows="10" class="form-control" name="content" id="content" placeholder="请输入评论内容"></textarea>
                        </div>
                    </div>
                    <div class="form-group">
                        <div class="col-sm-offset-2 col-sm-10">
                            <button type="submit" class="btn btn-primary">send</button>
                            <button type="reset" class="btn btn-danger">reset</button>
                        </div>

                    </div>
                </form>
            </div>
        </div>
    </div>
    <%- include("foot") %>

</body>


</html>